package top.easyblog.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.easyblog.core.support.cache.MappingCacheManager;
import top.easyblog.web.annotation.ResponseWrapper;

/**
 * @author: frank.huang
 * @date: 2023-12-23 16:32
 */
@RequestMapping("/v1/mapping-cache")
@RestController
public class UrlMappingCacheController {

    @Autowired
    private MappingCacheManager mappingCacheManager;


    @ResponseWrapper
    @PutMapping("/{compressCode}/disable")
    public void disableCache(@PathVariable("compressCode") String compressCode) {
        mappingCacheManager.disableCache(compressCode);
    }


}
